<template>
	<!-- 访客统计 -->
	<view class="browseWp">
		<view class="browse" v-if="totalViews" hover-class="hoverClass" @click="handleTotalViews">
			<view class="point">

			</view>
			<view class="totalNum">
				浏览{{totalViews?totalViews:''}}次
			</view>
			<view class="browseStatistics">
				<view class="avatar">
					<img :src="item" alt="" v-for="(item ,index) in avatarList" :key="index">
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "totalViews",
		data() {
			return {};
		},
		props: {
			avatarList: {
				type: Array,
				default: () => [],
				required: true
			},
			totalViews: {
				type: Number,
			}
		},
		methods: {
			handleTotalViews() {
				this.$emit('handleTotalViews')
			}
		}
	}
</script>

<style lang="scss" scoped>
	.browseWp {


		.browse {
			margin: 32rpx auto;
			width: 75%;
			height: 72rpx;
			padding: 0 10rpx;
			display: flex;
			justify-content: space-around;
			align-items: center;
			background: #FFFFFF;
			box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(0, 0, 0, 0.1);
			border-radius: 216rpx 216rpx 216rpx 216rpx;

			.point {
				width: 10rpx;
				height: 10rpx;
				border-radius: 50%;
				background-color: #FF7D00;
			}

			.browseStatistics {
				display: flex;
				align-items: center;

				.avatar {
					flex: 1;
					display: flex;
					background-color: #FFFFFF;


					img {
						width: 48rpx;
						height: 48rpx;
						border-radius: 50%;
						margin: 0 -10rpx;
					}
				}


			}

			.totalNum {
				height: 34rpx;
				font-size: 24rpx;
				font-weight: 400;
				color: #1D2129;
				line-height: 34rpx;
				margin: 0 10rpx;
				overflow: hidden;

			}





		}

	}
</style>